extends CanvasLayer

onready var playButton = $MarginContainer/PanelContainer/MarginContainer/VBoxContainer/PlayButton
onready var optionButton = $MarginContainer/PanelContainer/MarginContainer/VBoxContainer/OptionButton
onready var quitButton = $MarginContainer/PanelContainer/MarginContainer/VBoxContainer/QuitButton

func _ready():
	playButton.connect("pressed", self, "on_playButton_pressed")
	optionButton.connect("pressed", self, "on_optionButton_pressed")
	quitButton.connect("pressed", self, "on_quitButton_pressed")

func on_playButton_pressed():
	$"/root/LevelManager".change_level(0)
	
func on_optionButton_pressed():
	$"/root/SceenTransitionManager".transition_to_scene("res://scenes/UI/OptionsMenuStandalone.tscn")
	
func on_quitButton_pressed():
	yield(get_tree().create_timer(.2), "timeout")
	get_tree().quit()
